import ListTest.MyArrayList;

/*
 *Description:
 *User:laoHu
 *Created with Intellij IDEA 2025
 *Data:2025.07.02
 *Time:23 ：22
 */
public class Main {
    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(1,2);
        myArrayList.add(2,3);
        myArrayList.add(3,4);
        myArrayList.add(4,4);
        myArrayList.set(4,5);
        System.out.println(myArrayList.contains(5));
        myArrayList.remove(5);
        myArrayList.display();
        System.out.println(myArrayList.get(1));
        System.out.println(myArrayList.size());
        myArrayList.clear();
        myArrayList.display();
        myArrayList.add(2,3);
        boolean ifFull = myArrayList.ifFull();
        System.out.println(ifFull);
        boolean con = myArrayList.contains(1);
        System.out.println(con);
        int pos1 = myArrayList.get(1);
        System.out.println(pos1);
       int r = myArrayList.indexOf(2);
        System.out.println(r);
    }
}